#from django.db import models

# Create your models here.
from django.db import models

class RaceRecord(models.Model):
    project = models.CharField(max_length=50, verbose_name="项目")
    name = models.CharField(max_length=50, verbose_name="姓名")
    candidate_number = models.CharField(max_length=20, verbose_name="考生号")
    actual_speed = models.FloatField(verbose_name="实速值")
    variable_speed = models.FloatField(verbose_name="变速值")
    time = models.DateTimeField(auto_now_add=True, verbose_name="时间")
    image = models.ImageField(upload_to="race_images/", verbose_name="图片", blank=True, null=True)

    def __str__(self):
        return f"{self.name} - {self.project}"